--[[
* 能量变更后
*]]
---@class BuffEffect73 : BaseBuffEffect
BuffEffect73 = ClientFight.CreateClass("BuffEffect73", ClientFight.BaseBuffEffect)
local t = BuffEffect73
---@param fight Fight
---@param buff FighterBuff

function t:action(fight, buff, ...)
    local parameters = {...};
    if (isDamageActionTrigger(buff))then
        local isBuff =  parameters[4];
    if (isBuff) then
    return IBuffEffect.FAIL;
    end
    end
    local bonus = buff.buffBean.f_BuffEffectValue[1];
    local calculatorType = buff.buffBean.f_BuffEffectValue[2];
    local calculateAttrType = buff.buffBean.f_BuffEffectValue[3];
    local modifiedRatio = buff.buffBean.f_BuffEffectValue[4]; --基础系数  例如 恢复 5%  每叠加一层 + 1%
    local calculator = calculatorType == 0 and buff.source or buff.target;
    modifiedRatio = modifiedRatio + buff..buffBean.f_BuffEffectValue[5] * (buff.overlay - 1);--每层叠加的系数 每叠加一层 + 1%
    local result =  FightResult:New();
    result.state = DamageResultTypeEnum.HEAL;
    result.setDamage(AttackUtils.calculateEffectHeal(buff, calculator, calculateAttrType, modifiedRatio, bonus));
    DamageManager.realDamage(fight, buff.source, buff.target, buff.modelId, result, SkillDamageTypeEnum.HEAL);

    --LogUtil.info(fight, ()-> "[" + fight.getFrame() + "][EFFECT]Fighter " + buff.getTarget().getFighterId() + " Buff" + buff.getModelId() + " 触发回复HP效果，增加HP：" + result.getDamage());

    return  ClientFight.BaseBuffEffect.action(self, fight, buff, parameters);
    end

    t.New()